<template>
  <info-item title="词云">
    <div
      v-if="wordCloud"
      class="word-cloud"
    >
      <img
        class="word-cloud-img"
        :src="wordCloud"
      >
    </div>
    <div
      v-else
      class="no"
    >
      无词云
    </div>
  </info-item>
</template>

<script>
import InfoItem from '../InfoItem'
export default {
  name: 'WordCloud',
  components: {
    InfoItem
  },
  props: {
    wordCloud: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss" scoped>
.word-cloud {
  width: 100%;
  height: 400px;
  margin: auto;
  display: flex;
  justify-content: center;
  .word-cloud-img {
    width: 600px;
    height: 600px;
    position: absolute;
    clip: rect(0px, 600px, 400px, 0px);
  }
}
.no {
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 25px;
  font-weight: bold;
  color: #408df1;
}
</style>
